package com.village.friend.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.village.friend.entity.User;
import com.village.friend.entity.UserLook;
import com.village.friend.mapper.UserLookMapper;
import com.village.friend.service.UserLookService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 查看用户的记录 服务实现类
 * </p>
 *
 * @author yl
 * @since 2021-11-13
 */
@Service
public class UserLookServiceImpl extends ServiceImpl<UserLookMapper, UserLook> implements UserLookService {

    @Override
    public Integer insertOrUpdate(Integer userId, Integer userIdLooked) {
        return baseMapper.insertOrUpdate(userId, userIdLooked);
    }

    @Override
    public List<User> getLookList(Integer userId, Integer offset, Integer limit) {
        return baseMapper.getLookList(userId, offset, limit);
    }

    @Override
    public Integer getLookCount(Integer userId) {
        return  baseMapper.getLookCount(userId);
    }

    @Override
    public UserLook getLookUserToDay(Integer userId, Integer userIdLooked) {
        return baseMapper.getLookUserToDay(userId, userIdLooked);
    }
}
